﻿namespace RayDen.Engines.Ethalon
{
    public class Sample
    {
        public float ImageX, ImageY, LensU, LensV, Time;
        public float[] Data;


        protected ISampler sampler;
        protected int currentIndex;

        public Sample(ISampler sampler)
        {
            this.sampler = sampler;
            sampler.InitSample(this);
        }

        public float GetValue()
        {
            if (currentIndex >= Data.Length - 1)
            {
                currentIndex = 0;
            }

            return unchecked (Data[currentIndex++]);
        }
    }
}
